<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('考勤统计')" />
	<th:block th:include="include :: datetimepicker-css" />
	<style type="text/css">
		body {
				overflow-x: auto;
			}
		table.items,table.title {
			font-size: 14px;
			font-weight:500;
			font-family: 线体;
			margin-left: 5px;
		}
	    table.items,table.items tr,table.title,table.title tr{
		    text-align: center;
		    width: 1300px;
		    height: 40px;
		}
		.items td{ height:30px; border: 1px solid black;}
		.form-group{
			padding-top:5px;
		}
		.form-group .date{
			width:50%;float:right;
			margin-top:2px;
			padding-right:5px;
		}
		.form-group .btnBlock{
			width:150px;
			float:right;
		
		}
		.form-group .btnBlock button{
		}
		@media print{
		   body {
		       height: auto !important;
		   }
		}
	</style>
</head>
<body class="white-bg">
	<!-- 打印网页时通过hidden-print隐藏元素 -->
    <div class="text-right hidden-print">
       	<div class="form-group">
       	<div  style="overflow:auto;">
       		<div class="col-sm-8"></div>
       		
       		<div class="col-sm-4">  
       			<label class="control-label" style="margin-top: 10px;">日期：</label>
       			<div class="btnBlock">
		            <button class="btn btn-danger" onclick="refreshPage()"><i class="fa fa-refresh"></i> 刷新</button>
		       		<button class="btn btn-primary" onclick="printPage()"><i class="fa fa-print"></i> 打印</button>
	            </div>
	       		<div class="input-group date">
	                <input name="day" id="day" class="form-control" th:value="${day}" placeholder="yyyy-MM-dd" type="text">
	                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
	            </div>
	            
            </div>
       	</div>
       	</div>
    </div>
	<form class="form-horizontal m" id="form-purchase-edit" >
		<input type="hidden" name="id" id="id" th:value="${gysptKqproject.id}">
		<table style="margin-top: 0px;" class="title">
			<tr style="height: 60px;">
				<td style="text-align: left"></td>
				<td style="font-size: 30px;font-family: 线体;font-weight:500;">
				<span th:text="${years}"></span>年<span th:text="${month}"></span>月<span th:text="${gysptKqproject.name}">&nbsp;</span>班组考勤表
				</td>
			</tr>
		</table>
		<table class="items">
			<tr>
				<td style="width: 3%"><b>序&nbsp;&nbsp;号</b></td>
				<td style="width: 3%"><b>姓&nbsp;&nbsp;名</b></td>
				<td style="width: 3%"><b>合&nbsp;&nbsp;计</b></td>
				<td style="width: 2%" th:each="day,status:${daylis}"><b th:text="${day}">&nbsp;</b></td>
				<td style="width: 3%"><b>应&nbsp;&nbsp;发</b></td>
				<td style="width: 3%"><b>实&nbsp;&nbsp;发</b></td>
				<td style="width: 3%"><b>班组长签字</b></td>
			</tr>
			<tr th:each="rep,status:${replis}">
				<td style="width: 3%"><b th:text="${status.count}">&nbsp;</b></td>
				<td style="width: 3%"><b th:text="${rep.peopleName}">&nbsp;</b></td>
				<td style="width: 3%"><b th:text="${rep.peopleTotal}">&nbsp;</b></td>
				<td style="width: 2%" th:each="peopleJc,status:${rep.peopleJclis}"><b th:text="${peopleJc}">&nbsp;</b></td>
				<td style="width: 3%"><b>&nbsp;</b></td>
				<td style="width: 3%"><b>&nbsp;</b></td>
				<td style="width: 3%"><b>&nbsp;</b></td>
			</tr>
			<tr>
				<td style="width: 3%"><b>&nbsp;</b></td>
				<td style="width: 3%"><b>人数小计</b></td>
				<td style="width: 3%"><b th:text="${hj}">&nbsp;</b></td>
				<td style="width: 2%" th:each="xj,status:${dayxjs}"><b th:text="${xj}">&nbsp;</b></td>
				<td style="width: 3%"><b>&nbsp;</b></td>
				<td style="width: 3%"><b>&nbsp;</b></td>
				<td style="width: 3%"><b>&nbsp;</b></td>
			</tr>
		</table>
		<table  class="title" style="margin-top: 20px;">
			<tr>
				<td align="left">
					<b>项目经理：</b>
				</td>
			</tr>
			<tr>
				<td align="left">
					<b>项目责任人：</b>
				</td>
			</tr>
		</table>
	</form>
<!--     <div class="col-sm-12" style="text-align: center;"> -->
<!--       	<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp; -->
<!--       	<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button> -->
<!--     </div> -->
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
    	var prefix = ctx + "gcgl/kqproject";
        $("#form-purchase-edit").validate({
            focusCleanup: true
        });
        
        function printPage() {
            window.print();
        }
        
        function refreshPage(){
        	var day = $("#day").val();
        	var id = $("#id").val();
        	var url = prefix + "/kqtjdetail/"+id+"/"+day;
        	console.log(url);
//         	this.$tab.refreshPage(obj);
        	window.location.replace(url);
        }
        
        $("input[name='day']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

   </script>
</body>
</html>